Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

estree-util-is-identifier-name

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

estree-util-is-identifier-name

Check if something can be an ecmascript (javascript) identifier name

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.4M
decreased by-1.19%
Maintainers
1
Weekly downloads
 
Created
Source

estree-util-is-identifier-name

Build Coverage Downloads Size

Check if something can be an identifier name.

Install

npm:

npm install estree-util-is-identifier-name

Use

var isIdentifierName = require('estree-util-is-identifier-name')

isIdentifierName.name('$something69') // => true
isIdentifierName.name('69') // => false
isIdentifierName.name('var') // => true (this does not handle keywords)

isIdentifierName.start(48) // => false (character code for `0`)
isIdentifierName.cont(48) // => true (character code for `0`)

API

isIdentifierName.name(value)

Checks if the given string is a valid identifier name.

isIdentifierName.start(code)

Checks if the given character code can start an identifier.

isIdentifierName.cont(code)

Checks if the given character code can continue an identifier.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 12 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc